varying float depth;
uniform float centX;
uniform float centY;
uniform float centZ;
void main()
{
    vec4 vertex = gl_ModelViewMatrix * gl_Vertex;
    vec3 depth_vec = vec3(vertex.x-centX, vertex.y-centY, vertex.z-centZ);
    depth = sqrt(depth_vec.x*depth_vec.x + depth_vec.y*depth_vec.y + depth_vec.z*depth_vec.z);
    gl_Position = ftransform();
}
